﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Willow.Authorization
{
    public class GlobalModule
    {
        private readonly static Lazy<GlobalModule> _instance = new Lazy<GlobalModule>(() => new GlobalModule());
        private List<LoginModule> globalModule = new List<LoginModule>();
        public static GlobalModule Instance
        {
            get
            {
                return _instance.Value;
            }
        }

        private GlobalModule()
        {
        }

        public void Init(IEnumerable<LoginModule> modules)
        {
            globalModule.AddRange(modules);
        }
        public IEnumerable<LoginModule> GetAll()
        {
            return globalModule;
        }
    }
}
